FROM php:7.4.33-fpm-buster
MAINTAINER MONSTER_YUAN

#修改apt-get源
COPY ./sources.list /etc/apt/sources.list

#安装gd库
RUN apt-get update && apt-get install -y \
    libfreetype6-dev \
    libjpeg62-turbo-dev \
    libpng-dev \
    git \
    build-essential \
    libmagickcore-dev \
    libmagickwand-dev \
    vim \
    zlib1g-dev \
    libzip-dev \
    libwebp-dev \
    && docker-php-ext-configure gd --with-webp-dir=/usr/include/webp --with-jpeg-dir=/usr/include --with-png-dir=/usr/include --with-freetype-dir=/usr/include/freetype2 \
    && docker-php-ext-install -j$(nproc) gd bcmath && docker-php-ext-install pdo pdo_mysql mysqli zip \
    && pecl install redis && docker-php-ext-enable redis

RUN chmod 777 /usr/local/bin/composer

#复制php的配置文件到配置文件目录
COPY ./conf/php.ini ${PHP_INI_DIR}
COPY ./conf/php-fpm.conf /usr/local/etc/php-fpm.d/
COPY ./conf/www.conf /usr/local/etc/php-fpm.d/
COPY ./conf/zz-docker.conf /usr/local/etc/php-fpm.d/

#挂在卷
VOLUME ["/var/www","/wwwroot"]


WORKDIR /var/www

#曝光端口
EXPOSE 9074